#import "ASPImagingResponse.h"

@implementation ASPImagingResponse

/**
 * Maps json key to property name.
 * This method is used by `JSONModel`.
 */
+ (JSONKeyMapper *)keyMapper
{
  return [[JSONKeyMapper alloc] initWithDictionary:@{ @"Height": @"height", @"Width": @"width", @"BitsPerPixel": @"bitsPerPixel", @"BmpProperties": @"bmpProperties", @"GifProperties": @"gifProperties", @"JpegProperties": @"jpegProperties", @"PngProperties": @"pngProperties", @"TiffProperties": @"tiffProperties", @"PsdProperties": @"psdProperties", @"HorizontalResolution": @"horizontalResolution", @"VerticalResolution": @"verticalResolution", @"IsCached": @"isCached", @"Code": @"code", @"Status": @"status" }];
}

/**
 * Indicates whether the property with the given name is optional.
 * If `propertyName` is optional, then return `YES`, otherwise return `NO`.
 * This method is used by `JSONModel`.
 */
+ (BOOL)propertyIsOptional:(NSString *)propertyName
{
  NSArray *optionalProperties = @[@"height", @"width", @"bitsPerPixel", @"bmpProperties", @"gifProperties", @"jpegProperties", @"pngProperties", @"tiffProperties", @"psdProperties", @"horizontalResolution", @"verticalResolution", @"isCached", @"code", @"status"];

  if ([optionalProperties containsObject:propertyName]) {
    return YES;
  }
  else {
    return NO;
  }
}

/**
 * Gets the string presentation of the object.
 * This method will be called when logging model object using `NSLog`.
 */
- (NSString *)description {
    return [[self toDictionary] description];
}

@end
